<?php if (!defined('THINK_PATH')) exit(); global $isLogin;?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title><?=C('APP_NAME')?>-后台管理系统</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="stylesheet" type="text/css" href="/statics/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/statics/stylesheets/theme.css">
    <link rel="stylesheet" href="/statics/lib/font-awesome/css/font-awesome.css">

	<script src="/statics/arts/artDialog.source.js?skin=default"></script>
	<script src="/statics/arts/iframeTools.source.js"></script>
	<script src="/statics/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
	<script src="/statics/js/base.js" type="text/javascript"></script>
	<script type="text/javascript" src="/statics/lib/WdatePicker.js"></script>
	<link rel="stylesheet" href='/statics/css/lightbox.css'></link>
	<script type="text/javascript" src='/statics/js/lightbox.js'></script>
    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>
    
    <style>
		form {
			margin: 0;
		}
		textarea {
			display: block;
		}
		table {
	 		border:1px solid #dddddd
		}
	</style>
	<link rel="stylesheet" href="/statics/lib/themes/default/default.css" />
	<script charset="utf-8" src="/statics/lib/kindeditor-min.js"></script>
	<script charset="utf-8" src="/statics/lib/lang/zh_CN.js"></script>
	<script>
		var editor;
		KindEditor.ready(function(K) {
			editor = K.create('textarea[name="content"]', {
				allowFileManager : true,
				afterBlur:function(){
					   this.sync();
					},
			});
			K('input[name=getHtml]').click(function(e) {
				alert(editor.html());
			});
			K('input[name=isEmpty]').click(function(e) {
				alert(editor.isEmpty());
			});
			K('input[name=getText]').click(function(e) {
				alert(editor.text());
			});
			K('input[name=selectedHtml]').click(function(e) {
				alert(editor.selectedHtml());
			});
			K('input[name=setHtml]').click(function(e) {
				editor.html('<h3>Hello KindEditor</h3>');
			});
			K('input[name=setText]').click(function(e) {
				editor.text('<h3>Hello KindEditor</h3>');
			});
			K('input[name=insertHtml]').click(function(e) {
				editor.insertHtml('<strong>插入HTML</strong>');
			});
			K('input[name=appendHtml]').click(function(e) {
				editor.appendHtml('<strong>添加HTML</strong>');
			});
			K('input[name=clear]').click(function(e) {
				editor.html('');
			});
		});
	</script>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!-->
  <script src="/statics/js/sever_top_side.js" type="text/javascript"></script>
  <body>
		  
<?php if($isLogin && !I('get.ifm')){?>
<body class=""> 
  <!--<![endif]-->
  	<p style="width:0%;border:2px solid pink;margin:0px;position:absolute;top:0px;left:0px;z-index:100000" id="loadIngCent"></p>
    <div class="navbar" id="loadIngCent_navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    <!--<li><a href="#" class="hidden-phone visible-tablet visible-desktop ifrm" data-url="/sysmsg/showlogs" data-width="900" data-height="650" data-title="系统日志" data-params="" role="button">系统日志</a></li>-->
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="/statics/images/addpic.png" alt="">
                            <?=getLoginMsg()->username?>
                            <i class="icon-caret-down"></i>
                        </a>
                        
                        <ul class="dropdown-menu">
                            <li><a tabindex="-1" href="javascript:void(0)" id="myaccount" class="ifrm" data-url="/user/usercenter" data-width="450" data-height="450" data-title="我的账户" data-params="">我的账户</a></li>
                            <!--<li><a tabindex="-1" class="visible-phone" href="#">系统设置</a></li>-->
                            <li><a tabindex="-1"  href="/user/addAdmin" >新开帐号</a></li>
                            <li><a tabindex="-1" href="/user/loginout">注销</a></li>
                        </ul>
                    </li>
                </ul>
                <a class="brand" href="/user/loginout">
                    <img src="/statics/images/logo.png" alt=""><!--width: 18.5%;margin-right: .5em;vertical-align: -0.33333rem;-->
                    <span class="second">铜人宝医院安全管理系统</span>
                </a>
        </div>
    </div>
    <script>loadCent('20%',100);</script>
    <div class="sidebar-nav" id="sidebar-nav">
        <!--医院内部管理-->
		<a href="#accounts-menu-first-01" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_hospital.png" alt="">
            <span>医院内部管理</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
		<ul id="accounts-menu-first-01"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">科室管理</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">人员管理</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-03" class="active-two accounts-menu-two-ul" data-toggle="collapse">患者管理</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-03"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">患者账号管理</a></li>
                    <li class="active active-three"><a href="javascript:;">腕带管理</a></li>
                </ul>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-04" class="active-two accounts-menu-two-ul" data-toggle="collapse">黑名单管理</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-04"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">黑名单管理</a></li>
                    <li class="active active-three"><a href="javascript:;">权限管理</a></li>
                </ul>
            </li>
		</ul>

        <!--服务中心-->
        <a href="#accounts-menu-first-02" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_center.png" alt="">
            <span>服务中心</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
        <ul id="accounts-menu-first-02"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">患者呼叫</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">院内呼叫</a>
            </li>
        </ul>

        <!--预警管理-->
        <a href="#accounts-menu-first-03" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_warning.png" alt="">
            <span>预警管理</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
        <ul id="accounts-menu-first-03"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">预警处理</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">报警信号</a>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-04" class="active-two accounts-menu-two-ul" data-toggle="collapse">报警卡绑定记录</a>
            </li>
        </ul>

        <!--投诉管理-->
        <a href="#accounts-menu-first-04" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_complaint.png" alt="">
            <span>投诉管理</span>
            <img class="define-left" src="/statics/images/secer_left.png" alt="">
        </a>
        <ul id="accounts-menu-first-04"  class="accounts-menu-first-ul nav nav-list collapse">
            <li class="active">
                <a href="#accounts-menu-second-04-01" class="active-two accounts-menu-two-ul" data-toggle="collapse">患者投诉</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-04-01"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">投诉汇总</a></li>
                    <li class="active active-three"><a href="javascript:;">投诉参数设置</a></li>
                </ul>
            </li>
            <li class="active">
                <a href="#accounts-menu-second-04-02" class="active-two accounts-menu-two-ul" data-toggle="collapse">院内投诉</a><img class="define-left" src="/statics/images/secer_left.png" alt="">
                <ul id="accounts-menu-second-04-02"  class="nav nav-list collapse">
                    <li class="active active-three"><a href="javascript:;">投诉汇总</a></li>
                    <li class="active active-three"><a href="javascript:;">投诉参数设置</a></li>
                </ul>
            </li>
        </ul>

        <!--后勤管理-->
        <a href="#accounts-menu-first-05" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/secer_logi.png" alt="">
            <span>后勤管理</span>
        </a>

        <!--资产管理-->
        <a href="#accounts-menu-first-06" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/secer_property.png" alt="">
            <span>资产管理</span>
        </a>

        <!--公告管理-->
        <a href="#accounts-menu-first-07" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_announcements.png" alt="">
            <span>公告管理</span>
        </a>

        <!--管理账号管理-->
        <a href="#accounts-menu-first-08" class="nav-header sidebar-nav-a collapsed" data-toggle="collapse">
            <img class="define-nav" src="/statics/images/sever_account.png" alt="">
            <span>管理账号管理</span>
        </a>

    </div>
    <script>loadCent('30%',100);</script>
    <div class="content">
        <div class="header">
        	<!-- 
			<div class="stats">
				<p class="stat"><span class="number"><?=session('tj_life_regist')?></span>今日注册数</p>
				<p class="stat"><span class="number"><?=session('tj_life_port')?></span>今日订单数</p>
			</div> -->
			<!--<h1 class="page-title"><?=C('menus')[$_current_c[0]][$_current_c[1]]['tip']?></h1> -->
        </div>

        <div class="container-fluid">
            <div class="row-fluid">
            <script>
                loadCent('60%',100);
                height_loadIngCent_navbar();
                function height_loadIngCent_navbar() {
                    $('#sidebar-nav').css('top',$('#loadIngCent_navbar').outerHeight())
                }
                $(window).resize(function () {
                    height_loadIngCent_navbar();
                })
            </script>
<?php }?>
 <style>
    label,select{font-size: 0.363636rem;margin: 0;}
    ul{list-style: none;margin: 0;}
    .define{
        background-color: #f6f6f6;
    }
    .container-fluid{
        padding: 0;
    }
    .define-nav{
        background-color: #FFF;
        padding: 0.39393939rem 0 0.39393939rem 0.848484rem;
    }
    .define-nav .pull-left{
        color: #666;
        display: inline-block;
        font-size: 0.54rem;
        margin-top:6px;
    }
    .define-nav .pull-right{
        margin-right: 0.909090rem;
    }
    #admin_search_people,
    #admin_add_people{
        width: 3.272727rem;
    }
    .define-nav-input{
        margin-top: 0.87878787rem;
        margin-left: 0.909090rem;
        background-color: #FFF;
        padding:  0.757575rem 0;
        margin-right: 0.909090rem;
    }
    .define-nav-input .pull-right{
        margin-right: 0.909090rem;
    }
    .define-nav-input .define-table-input:nth-child(1){
        padding-left: 0.60606060rem;
    }
    .define-nav-input .define-table-input:nth-child(3),
    .define-nav-input .define-table-input:nth-child(2){
        padding-left: 1.818181rem;
    }
    .define-nav-input span{
        font-size: 0.424242rem;
        display: inline-block;
        margin-top: 6px;
    }
    .define-nav-input input{
        margin: 0;
        padding: 0.1rem 0.2rem;
        width: 7.878787rem;
        height: 0.727272rem;
        line-height: normal;
        font-size: 0.424242rem;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
        border-color: #E6E6E6;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
    }
    .define-nav-input input::-webkit-input-placeholder {
        font-size: 1px;
        line-height: 1;
    }
    .define-nav-input input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
        font-size: 0.2rem;
        line-height: 2.2;
    }
    .define-nav-input input::-moz-placeholder { /* Mozilla Firefox 19+ */
        font-size: 0.2rem;
        line-height: 2.2;
    }
    .define-nav-input input:-ms-input-placeholder { /* Internet Explorer 10+ */
        font-size: 0.2rem;
        line-height: 2.2;
    }
    .define-table-input button{
        background-color: #F7F9FA;
        border: 1px solid #E6E6E6;
        color: #999;
        height: 1.03rem;
        line-height: 0.606060rem;
        padding-left: 0.303030rem;
        padding-right: 0.303030rem;
        font-size: 0.424242rem;
        border-radius: 3px;
        width: 4.2rem;
    }
    .define-table-input button i{
        padding-left: 1.333333rem;
    }
    .define-table-input button:focus,
    .define-table-input button:active,
    .define-table-input button:hover{
        border: 1px solid #E6E6E6;
        outline: none;
    }
    .define-table{
        margin-left: 0.9090909rem;
        margin-right: 0.9090909rem;
    }
    .table{
        border-radius: 3px;
        margin-bottom: 0;
        border: 1px solid #E6E6E6;
        font-size: 0.424242rem;
    }
    .table thead{
        background-color: #FAFAFA;
        color: #999;
    }
    .table tr{
        padding-left: 0.606060rem;
    }
    .table td{
        border-top: 1px solid #E6E6E6;
        border-bottom: 1px solid #E6E6E6;
        padding: 0.51515151rem 0.242424rem;
        line-height: 1.2;
    }
    .table tbody{
        background-color: #FFF;
    }
    .table tbody td{
        vertical-align: bottom;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    .table-hover tbody tr:hover td{
        background-color: #fafafa;
    }
    .table tbody tr td.clearfix:last-child{
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
    }
    .table tbody tr td.clearfix:last-child .pull-left{
        padding: 0.1rem 0.2rem ;
    }
    .table tbody tr td.clearfix:last-child .pull-left:hover{
        background-color: #e6e6e6;
        border-radius: 2px;
    }
    .define-table .table tbody td:nth-child(4){
        padding: 2px;
    }
    .table tbody td:nth-child(4) img{
        width: 1.212121rem;
        vertical-align: -1px;
        -webkit-border-radius: 50%;
        -moz-border-radius: 50%;
        border-radius: 50%;
    }
    td.clearfix img{
        width: 0.393939rem;
        vertical-align: -2px;
        margin-right: 5px;
    }
    td.clearfix div:nth-child(2),
    td.clearfix div:nth-child(3){
        margin-left: 0.606060rem;
    }
    .define-paging{
        margin-top: 0.6363rem;
        display: block;
        color: #999;
        font-size: 0.363636rem;
        text-align: center;
    }
    /*改变鼠标悬浮样式  ↓*/
    .table tbody tr td.clearfix:last-child .pull-left:hover,
    #admin_select_img_add_btn_default,
    .define-paging .pull-left:not(:first-child){
        cursor: pointer;
    }
    /*改变鼠标悬浮样式  ↑*/
    .define-paging .pull-left{
        padding: 0 0.272727rem;
    }
    .define-page.define-active{
        color: #47489A;
    }
    .define-paging .pull-left:first-child{
        margin-left: 38%;
        letter-spacing: 0.2rem;
    }
    /*选择科室*/
    .dropdown-menu{
        font-size: 0.42424242rem;
        text-align: center;
        left: 27%;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
        min-width: 72%;
        padding: 0;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
    }
    .dropdown-menu li{
        line-height: 1;
        padding: 5px 0;
    }
    .dropdown-menu li:hover{
        background-color: #E6E6E6;
    }

    /*弹层样式设计*/
    .modal{
        width: 41%;
        min-width: 605px;
        margin: 0;
    }
    .modal.fade{
        top: -100%;
    }
    .modal-backdrop, .modal-backdrop.fade.in{
        opacity: 0.5;
        filter:alpha(opacity=50);
    }
    .modal-header{
        background-color: #FAFAFA;
        padding: 0.343434rem 0.636363rem;
    }
    .modal-title{
        font-size: 0.36363636rem;
        color: #1CC7BD;
    }
    .define-modal-close {
        position: absolute;
        border: none;
        right: 0.636363rem;
        font-size: 1em;
        font-weight: 100;
    }
    .define-modal-close img{
        width: 12px;
        vertical-align: 4px;
    }
    .define-modal-close img:hover{
        -webkit-animation: img_hover_rotate .2s linear;
        -o-animation: img_hover_rotate .2s linear;
        animation: img_hover_rotate .2s linear;
    }
    @-webkit-keyframes img_hover_rotate {
        0%{  -webkit-transform: rotate(0deg);  }
        100%{  -webkit-transform: rotate(90deg);  }
    }
    @-o-keyframes img_hover_rotate {
        0%{  -o-transform: rotate(0deg);  }
        100% {  -o-transform: rotate(90deg);  }
    }
    @-ms-keyframes img_hover_rotate {
        0%{  -ms-transform: rotate(0deg);  }
        100%{  -ms-transform: rotate(90deg);  }
    }
    @-moz-keyframes img_hover_rotate {
        0%{  -moz-transform: rotate(0deg);  }
        100%{  -moz-transform: rotate(90deg);  }
    }
    @-khtml-keyframes img_hover_rotate {
        0%{  -khtml-transform: rotate(0deg);  }
        100%{  -khtml-transform: rotate(90deg);  }
    }
    @keyframes  img_hover_rotate{
        0%{  transform: rotate(0deg);  }
        100%{  transform: rotate(90deg);  }
    }
    .modal .modal-body{
        max-height: 500px;
    }
    .modal .modal-body{
        padding: 0.878787rem 1rem;
        font-size: 0.363636rem;
    }

    /*选择添加人员类型*/
    #add_user_select_modal.modal{
        width: 17%;
        min-width: 300px;
    }
    #add_user_select_modal .modal-body{
        padding: 0;
    }
    #add_user_select_modal table{
        border: none;
        width: 100%;
    }
    #add_user_select_modal table tr:not(:last-child){
        border-bottom: 1px solid #e6e6e6;
    }
    #add_user_select_modal table td{
        padding: 0.343434rem 0.636363rem;
    }
    #add_user_select_modal table td:nth-child(2){
        text-align: right;
    }

    /*领导  科室  后勤*/
    .modal-body table{
        border: none;
        width: 100%;
    }
    .modal-body table td{
        padding-bottom: 0.5rem;
        vertical-align: middle;
    }
    .modal-body table td:nth-child(1) img{
        vertical-align: text-top;
    }
    #add_user_doctor_modal .modal-body table td:nth-child(1){
        width: 52px;
        text-align: right;
        padding-right: 5px;
    }
    #add_user_logistics_modal .modal-body table td:nth-child(1),
    #add_user_lead_modal .modal-body table td:nth-child(1){
        width: 57px;
        text-align: right;
        padding-right: 5px;
    }
    .modal-body table:first-child td:nth-child(2){
        position: relative;
    }
    .modal-body table:first-child td:nth-child(2) div{
        border: 1px solid #e6e6e6;
        padding: 0.25rem;
        border-radius: 3px;
    }
    .modal-body table:first-child td:nth-child(2) div#doctor_select_type,
    .modal-body table:first-child td:nth-child(2) div#logistics_select_type,
    .modal-body table:first-child td:nth-child(2) div#lead_select_type{
        position: absolute;
        background-color: #FFF;
        padding: 0;
        width: 99.5%;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-top: none;
        display: none;
        z-index: 10;
    }
    .modal-body table:first-child td:nth-child(2) div#doctor_select_type.active,
    .modal-body table:first-child td:nth-child(2) div#logistics_select_type.active,
    .modal-body table:first-child td:nth-child(2) div#lead_select_type.active{
        display: block;
    }
    .modal-body table:first-child td:nth-child(2) div#doctor_select_type div,
    .modal-body table:first-child td:nth-child(2) div#logistics_select_type div,
    .modal-body table:first-child td:nth-child(2) div#lead_select_type div{
        border: none;
        border-radius: 0;
    }
    .modal-body table:first-child td:nth-child(2) div#doctor_select_type div:hover,
    .modal-body table:first-child td:nth-child(2) div#logistics_select_type div:hover,
    .modal-body table:first-child td:nth-child(2) div#lead_select_type div:hover{
        background-color: #FAFAFA;
    }
    .modal-body table:first-child td:nth-child(2) div#doctor_select_type div.active,
    .modal-body table:first-child td:nth-child(2) div#logistics_select_type div.active,
    .modal-body table:first-child td:nth-child(2) div#lead_select_type div.active{
        background-color: #e6e6e6;
    }
    .modal-body table:first-child td:nth-child(2) img{
        position: absolute;
        top: 30%;
        right: 0.25rem;
    }
    .modal-body table:nth-child(2) td:nth-child(2){
        width: 2.39393939rem;
    }
    .modal-body table:nth-child(2) td:nth-child(2) img{
        width: 100%;
        height: 2.39393939rem;
        border-radius: 50%;
        min-width: 57px;
        min-height: 57px;
    }
    .modal-body table:nth-child(2) td:nth-child(3){
        padding-left: 0.575757rem;
    }
    .modal-body table:nth-child(2) td:nth-child(3) div:first-child{
        border: 1px solid #e6e6e6;
        border-radius: 3px;
        width: 15%;
        text-align: center;
        padding: 0.1666666rem 0;
        cursor: pointer;
    }
    .modal-body table:nth-child(2) td:nth-child(3) div:nth-child(3){
        color: #C9C8C8;
    }
    .modal-body > div.clearfix > div{
        width: 49%;
    }
    .modal-body > div.clearfix .pull-right{
        margin-left: 2%;
    }
    .modal-body > div.clearfix table input{
        width: 95.5%;
        margin: 0;
        font-size: 12px;
        -webkit-box-shadow: none;
        box-shadow: none;
        border: 1px solid #e6e6e6;
        border-radius: 3px;
        padding: 0.25rem 6px;
    }
    .modal-body textarea:-moz-placeholder,
    .modal .modal-body input:-moz-placeholder{
        color: #C9C8C8;
        font-size: 12px;
    }
    .modal-body textarea:-ms-input-placeholder,
    .modal .modal-body input:-ms-input-placeholder{
        color: #C9C8C8;
        font-size: 12px;
    }
    .modal-body textarea::-webkit-input-placeholder,
    .modal .modal-body input::-webkit-input-placeholder {
        color: #C9C8C8;
        font-size: 12px;
    }
    .modal-body textarea:focus,
    .modal-body > div.clearfix table input:focus{
        border-color: rgba(82, 168, 236, 0.8);
        outline: 0;
        outline: thin dotted \9;
        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
        -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
    }
    .modal-body textarea{
        width: 98%;
        border-color: #e6e6e6;
        -webkit-box-shadow: none;
        box-shadow: none;
        resize: none;
        margin: 0;
    }
    .modal-body table:last-child tr:last-child div{
        background-color: #1CC7BD;
        color: #fff;
        text-align: center;
        width: 25.5%;
        border-radius: 3px;
        padding: 0.166666rem 0;
    }
    .modal-body table:last-child tr:last-child td:first-child div{
        margin-left: 75%;
    }
    .modal-body table:last-child tr:last-child td:last-child div{
        margin-left: 5%;
    }
    .modal-body table:last-child tr:last-child div:hover{
        background-color: #18ADA4;
        cursor: pointer;
    }
    #doctor_select_admin,
    #logistics_select_admin,
    #lead_select_admin{
        z-index: 10;
        border-top: none;
        position: absolute;
        padding: 0;
        background-color: #FFF;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        display: none;
        max-height: 220px;
        overflow: auto;
    }
    #doctor_select_admin.active,
    #logistics_select_admin.active,
    #lead_select_admin.active{
        display: block;
    }
    #doctor_select_admin div,
    #logistics_select_admin div,
    #lead_select_admin div{
        border-radius: 0;
        border: none;
    }
    #doctor_select_admin div:hover,
    #logistics_select_admin div:hover,
    #lead_select_admin div:hover{
        background-color: #FAFAFA;
    }
    #doctor_select_admin div.active,
    #logistics_select_admin div.active,
    #lead_select_admin div.active{
        background-color: #e6e6e6;
    }

    /*请填写完整信息弹层*/
    #department_modal_tip{
        width: 15%;
        min-width: 220px;
        z-index: 1051;
    }
    #department_modal_tip .modal-body{
        text-align: center;
    }
    #department_modal_tip .modal-header{
        background-color: #FFF;
    }
    #department_modal_tip .modal-body div:nth-child(1){
        margin-top: 1em;
    }
    #department_modal_tip .modal-body div:nth-child(2){
        background-color: #1CC7BD;
        color: #FFF;
        margin: 2em auto 0 auto;
        width: 30%;
        padding: 0.1666666rem 0;
        border-radius: 3px;
    }
    #department_modal_tip .modal-body div:nth-child(2):hover{
        background-color: #18ADA4;
        cursor: pointer;
    }


    /*适配*/
    @media (min-width: 1024px){
        /*18*/
        .define-modal-close img{
            vertical-align: 0;
        }
        .define-table-input button{
            line-height: 1.33;
            width: 5.5rem;
        }
        td.clearfix img{
            width: 0.55rem;
            vertical-align: -1px;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.6rem;
        }
        .table tbody td:nth-child(4) img{
            vertical-align: 0;
        }
        .define-nav-input input{
            line-height: normal;
            font-size: 0.424242rem;
        }
        .modal-body table:first-child td:nth-child(2) img.status_img{
            right: 7px;
        }
        #department_modal_tip .modal-header img{
            top: 5.8%
        }
        .define-nav-input span{
            margin-top: -1px;
        }
    }
    @media (min-width: 1100px) {
        /*20*/
        .define-table-input button{
            line-height: 1.45;
        }
        td.clearfix img{
            vertical-align: -2px;
        }
        .define-modal-close img{
            vertical-align: 0;
        }
        .define-nav-input span{
            margin-top: 0;
        }
    }
    @media (min-width: 1280px) {
        /*22*/
        .define-table-input button{
            line-height: 1.7;
            width: 5rem;
        }
        td.clearfix img{
            width: 0.5rem;
        }
        #department_modal_tip .modal-header img{
            top: 6.8%
        }
        .define-nav-input span{
            margin-top: 2px;
        }
    }
    @media (min-width: 1366px) {
        /*24*/
        .define-modal-close img{
            vertical-align: 1px;
        }
        .define-table-input button{
            line-height: 1.9;
        }
        td.clearfix img{
            width: 0.45rem;
            vertical-align: -1px;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.5rem;
        }
        .define-nav-input span{
            margin-top: 3px;
        }
    }
    @media (min-width: 1440px) {
        /*25*/
        .define-modal-close img{
            vertical-align: 2px;
        }
        .define-table-input button{
            line-height: 1.95;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.45rem;
        }
    }
    @media (min-width: 1680px) {
        /*28*/
        .define-modal-close img{
            vertical-align: 3px;
        }
        .define-table-input button{
            line-height: 2.2;
        }
        td.clearfix img{
            width: 0.36rem;
            vertical-align: -1px;
        }
        td.clearfix div:nth-child(3) img{
            width: 0.4rem;
        }
        .table tbody td:nth-child(4) img{
            vertical-align: -1px;
        }
        #department_modal_tip .modal-header img{
            top: 7.8%
        }
        .define-nav-input span{
            margin-top: 5px;
        }
    }
    @media (min-width: 1920px) {
        /*33*/
        .define-modal-close img{
            vertical-align: 4px;
        }
        .define-table-input button{
            width: 4.2rem;
        }
        .define-nav-input span{
            margin-top: 6px;
        }
    }
</style>

<div class="define">
    <div class="define-nav clearfix">
        <div class="pull-left">人员管理</div>
        <div class="pull-right"><img id="admin_add_people" src="/statics/images/sever_add.png" alt=""></div>
    </div>

    <div class="define-nav-input clearfix">
        <form id="hos_user_form" action="/hospital/hos_user" method="get">
        <div class="define-table-input pull-left clearfix">
            <span class="pull-left">姓名：</span>
            <input class="pull-left" type="text" name="user_name" value="<?=I('get.user_name')?>" placeholder="请输入姓名">
        </div>
        <div class="define-table-input pull-left clearfix">
            <span class="pull-left">手机号：</span>
            <input class="pull-left" type="text" name="mobile" value="<?=I('get.mobile')?>" placeholder="请输入手机号">
        </div>
        <div class="define-table-input pull-left">
            <div class="dropdown clearfix">
                <span class="pull-left">科室：</span>
                <button class="pull-left" id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    选择科室
                    <i class="icon-chevron-down"></i>
                </button>
                <ul id="dropdown_menu_ul" class="dropdown-menu" aria-labelledby="dLabel">
                    <?php if($depart){foreach($depart as $val){?>
                    <li data_value="<?=$val['id']?>"><?=$val['de_name']?></li>
                    <?php }}?>
                    <!--<li>科室1</li>
                    <li>科室2</li>
                    <li>科室3</li>
                    <li>科室4</li>
                    <li>科室5</li>
                    <li>科室6</li>
                    <li>科室7</li>
                    <li>科室8</li>
                    <li>科室9</li>
                    <li>科室10</li>-->
                </ul>

                <select id="dropdown_menu_select" name="depart_id" style="display: none;">
                    <option value="0">请选择</option>
                    <!--<?php if($depart){foreach($depart as $val){?>
                    <option value="<?=$val['id']?>"><?=$val['de_name']?></option>
                    <?php }}?>-->
                </select>
            </div>
        </div>
        </form>
        <div class="define-table-input pull-right">
            <img id="admin_search_people" src="/statics/images/sever_search.png" alt="">
        </div>
        <script>
            $('#admin_search_people').click(function () {
                    $('#hos_user_form').submit();
                }
            );
        </script>
    </div>

    <div style="margin-left: 0.90rem;font-size: 0.424242rem;margin-top: 0.545454rem;margin-bottom: 0.545454rem;">全部结果</div>

    <div class="define-table">
        <table class="table table-hover" id="table_handle">
            <thead>
            <tr>
                <td>序号</td>
                <td>姓名</td>
                <td>类型</td>
                <td>头像</td>
                <td>职务</td>
                <td>年龄</td>
                <td>上级主管</td>
                <td>科室</td>
                <td>手机号</td>
                <td>操作</td>
            </tr>
            </thead>
            <tbody>
            <?php
 $user_type = ['','院领导','分管领导','科室主任','医生','护士','安保','保洁']; ?>
            <?php if($userData){ foreach($userData as $val){?>
            <tr>
                <td><?=$val['user_id']?></td>
                <td><?=$val['user_name']?></td>
                <td><?=$user_type[$val['user_type']]?></td>
                <td><img src="/statics/images/addpic.png" alt=""></td>
                <td><?=$val['job']?></td>
                <td><?=$val['age']?></td>
                <td><?=$val['last_leader']?:'无'?></td>
                <td><?=$val['de_name']?></td>
                <td><?=$val['mobile']?></td>
                <td class="clearfix">
                    <div class="pull-left define_details"><img src="/statics/images/sever_info_undisabled.png" alt="">详情</div>
                    <div class="pull-left define_edit"><img src="/statics/images/sever_edit.png" alt="">编辑</div>
                    <div class="pull-left define_used"><img src="/statics/images/sever_undisabled.png" alt="">启用</div>
                </td>
            </tr>
            <?php }}else{?>
            <tr>
                <td colspan="10" style="text-align: center">暂无数据</td>
            </tr>
            <?php }?>
            </tbody>
        </table>
    </div>

    <!--分页  开始-->
    <div class="define-paging clearfix">
        <div class="pull-left">共8页</div>
        <div class="pull-left" id="the_first_page">首页</div>
        <div class="pull-left" id="prev_page">上一页</div>
        <div class="pull-left define-page define-active">1</div>
        <div class="pull-left define-page">2</div>
        <div class="pull-left define-page">3</div>
        <div class="pull-left define-page">4</div>
        <div class="pull-left define-page">5</div>
        <div class="pull-left" id="next_page">下一页</div>
        <div class="pull-left" id="the_last_page">尾页</div>
    </div>
    <!--分页  结束-->
</div>

<!--添加人员  领导  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="add_user_lead_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">添加人员</div>
            </div>
            <div class="modal-body">
                <!--选择类型  开始-->
                <table>
                    <tr>
                        <td><img src="/statics/images/sever_must_write.png" alt="">类型:</td>
                        <td>
                            <div id="lead_select_type_btn">院长</div>
                            <img class="status_img" src="/statics/images/sever_unretrieve.png" alt="">
                            <div id="lead_select_type">
                                <div>院长</div>
                                <div>副院长</div>
                                <div>办公室主任</div>
                            </div>
                        </td>
                    </tr>
                </table>
                <!--选择类型  结束-->

                <!--头像  开始-->
                <table>
                    <tr>
                        <td>头像:</td>
                        <td><img id="lead_modal_select_img_show" src="/statics/images/sever_defaultimg_parameter.png" alt=""></td>
                        <td>
                            <div id="lead_modal_select_img">选择图片</div>
                            <form id="lead_modal_select_img_form" style="display: none;">
                                <input type="file" id="lead_modal_select_img_input">
                            </form>
                            <div style="color: #C9C8C8;">支持PNG,JPG等格式图片。大小不超过2M。</div>
                        </td>
                    </tr>
                </table>
                <!--头像  结束-->

                <!--信息输入  开始-->
                <div class="clearfix">
                    <div class="pull-left">
                        <table>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">姓名:</td>
                                <td>
                                    <input type="text" placeholder="请输入姓名">
                                </td>
                            </tr>
                            <tr>
                                <td>年龄:</td>
                                <td>
                                    <input type="text" placeholder="请输入年龄">
                                </td>
                            </tr>
                            <!--<tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">密码设置:</td>
                                <td>
                                    <input type="text" placeholder="请输入密码" value="888888">
                                </td>
                            </tr>-->
                        </table>
                    </div>
                    <div class="pull-right">
                        <table>
                            <!--<tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">科室:</td>
                                <td>
                                    <input id="lead_select_admin_btn" style="cursor: default;" onfocus="this.blur();" type="text" placeholder="请选择科室">
                                    <img src="/statics/images/sever_unretrieve.png" alt="">
                                    <div id="lead_select_admin">
                                        <div>牙科</div>
                                        <div>儿科</div>
                                        <div>口腔科</div>
                                        <div>放射科</div>
                                        <div>放射科</div>
                                    </div>
                                </td>
                            </tr>-->
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">密码设置:</td>
                                <td>
                                    <input type="text" placeholder="请输入密码" value="888888">
                                </td>
                            </tr>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">手机号:</td>
                                <td>
                                    <input type="text" placeholder="请输入手机号">
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <!--信息输入  结束-->
                <!--简介及确认、重置按钮  开始-->
                <table>
                    <tr>
                        <td style="vertical-align: text-top;padding-top: 6px;">简介:</td>
                        <td>
                            <textarea placeholder="您的自我介绍..."></textarea>
                        </td>
                    </tr>
                </table>
                <table>
                    <tr>
                        <td style="width: 50%;padding-bottom: 0;padding-top: 1em;">
                            <div id="lead_resever">重置</div>
                        </td>
                        <td style="width: 50%;padding-bottom: 0;padding-top: 1em;">
                            <div id="lead_sure_add">确认添加</div>
                        </td>
                    </tr>
                </table>
                <!--简介及确认、重置按钮  结束-->
            </div>
        </div>
    </div>
</div>
<!--添加人员  领导  结束-->

<!--添加人员  科室  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="add_user_doctor_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">添加人员</div>
            </div>
            <div class="modal-body">
                <!--选择类型  开始-->
                <table>
                    <tr>
                        <td><img src="/statics/images/sever_must_write.png" alt="">类型:</td>
                        <td>
                            <div id="doctor_select_type_btn">医生</div>
                            <img class="status_img" src="/statics/images/sever_unretrieve.png" alt="">
                            <div id="doctor_select_type">
                                <div>科室主任</div>
                                <div>医生</div>
                                <div>护士</div>
                            </div>
                        </td>
                    </tr>
                </table>
                <!--选择类型  结束-->

                <!--头像  开始-->
                <table>
                    <tr>
                        <td>头像:</td>
                        <td><img id="doctor_modal_select_img_show" src="/statics/images/sever_defaultimg_parameter.png" alt=""></td>
                        <td>
                            <div id="doctor_modal_select_img">选择图片</div>
                            <form id="doctor_modal_select_img_form" style="display: none;">
                                <input type="file" id="doctor_modal_select_img_input">
                            </form>
                            <div style="color: #C9C8C8;">支持PNG,JPG等格式图片。大小不超过2M。</div>
                        </td>
                    </tr>
                </table>
                <!--头像  结束-->

                <!--信息输入  开始-->
                <div class="clearfix">
                    <div class="pull-left">
                        <table>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">姓名:</td>
                                <td>
                                    <input type="text" placeholder="请输入姓名">
                                </td>
                            </tr>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">科室:</td>
                                <td>
                                    <input id="doctor_select_admin_btn" style="cursor: default;" onfocus="this.blur();" type="text" placeholder="请选择科室">
                                    <img src="/statics/images/sever_unretrieve.png" alt="">
                                    <div id="doctor_select_admin">
                                        <div>牙科</div>
                                        <div>儿科</div>
                                        <div>口腔科</div>
                                        <div>放射科</div>
                                        <div>放射科</div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">职称:</td>
                                <td>
                                    <input type="text" placeholder="请输入职称">
                                </td>
                            </tr>
                            <tr>
                                <td>擅长:</td>
                                <td>
                                    <input type="text" placeholder="您所擅长的..." >
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="pull-right">
                        <table>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">手机号:</td>
                                <td>
                                    <input type="text" placeholder="请输入手机号">
                                </td>
                            </tr>
                            <tr>
                                <td>年龄:</td>
                                <td>
                                    <input type="text" placeholder="请输入年龄">
                                </td>
                            </tr>
                            <tr>
                                <td>密码设置:</td>
                                <td>
                                    <input type="text" placeholder="请输入密码" value="888888">
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <!--信息输入  结束-->
                <!--简介及确认、重置按钮  开始-->
                <table>
                    <tr>
                        <td style="vertical-align: text-top;padding-top: 6px;">简介:</td>
                        <td>
                            <textarea placeholder="您的自我介绍..."></textarea>
                        </td>
                    </tr>
                </table>
                <table>
                    <tr>
                        <td style="width: 50%;padding-bottom: 0;padding-top: 1em;">
                            <div id="doctor_resever">重置</div>
                        </td>
                        <td style="width: 50%;padding-bottom: 0;padding-top: 1em;">
                            <div id="doctor_sure_add">确认添加</div>
                        </td>
                    </tr>
                </table>
                <!--简介及确认、重置按钮  结束-->
            </div>
        </div>
    </div>
</div>
<!--添加人员  科室  结束-->

<!--添加人员  后勤  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="add_user_logistics_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">添加人员</div>
            </div>
            <div class="modal-body">
                <!--选择类型  开始-->
                <table>
                    <tr>
                        <td><img src="/statics/images/sever_must_write.png" alt="">类型:</td>
                        <td>
                            <div id="logistics_select_type_btn">保安</div>
                            <img class="status_img" src="/statics/images/sever_unretrieve.png" alt="">
                            <div id="logistics_select_type">
                                <div>保安</div>
                                <div>保洁</div>
                            </div>
                        </td>
                    </tr>
                </table>
                <!--选择类型  结束-->

                <!--头像  开始-->
                <table>
                    <tr>
                        <td>头像:</td>
                        <td><img id="logistics_modal_select_img_show" src="/statics/images/sever_defaultimg_parameter.png" alt=""></td>
                        <td>
                            <div id="logistics_modal_select_img">选择图片</div>
                            <form id="logistics_modal_select_img_form" style="display: none;">
                                <input type="file" id="logistics_modal_select_img_input">
                            </form>
                            <div style="color: #C9C8C8;">支持PNG,JPG等格式图片。大小不超过2M。</div>
                        </td>
                    </tr>
                </table>
                <!--头像  结束-->

                <!--信息输入  开始-->
                <div class="clearfix">
                    <div class="pull-left">
                        <table>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">姓名:</td>
                                <td>
                                    <input type="text" placeholder="请输入姓名">
                                </td>
                            </tr>
                            <tr>
                                <td>年龄:</td>
                                <td>
                                    <input type="text" placeholder="请输入年龄">
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="pull-right">
                        <table>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">手机号:</td>
                                <td>
                                    <input type="text" placeholder="请输入手机号">
                                </td>
                            </tr>
                            <tr>
                                <td><img src="/statics/images/sever_must_write.png" alt="">密码设置:</td>
                                <td>
                                    <input type="text" placeholder="请输入密码" value="888888">
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <!--信息输入  结束-->
                <!--确认、重置按钮  开始-->
                <table>
                    <tr>
                        <td style="width: 50%;padding-bottom: 0;padding-top: 1em;">
                            <div id="logistics_resever">重置</div>
                        </td>
                        <td style="width: 50%;padding-bottom: 0;padding-top: 1em;">
                            <div id="logistics_sure_add">确认添加</div>
                        </td>
                    </tr>
                </table>
                <!--确认、重置按钮  结束-->
            </div>
        </div>
    </div>
</div>
<!--添加人员  后勤  结束-->

<!--选择添加人员类型  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="add_user_select_modal">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">请选择添加人员类型</div>
            </div>
            <div class="modal-body">
                <table>
                    <tr>
                        <td>领导</td>
                        <td><img src="" alt=""></td>
                    </tr>
                    <tr>
                        <td>科室</td>
                        <td><img src="" alt=""></td>
                    </tr>
                    <tr>
                        <td>后勤</td>
                        <td><img src="" alt=""></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
<!--选择添加人员类型  结束-->

<!--信息填写提示  开始-->
<div class="modal fade" tabindex="-1" role="dialog" id="department_modal_tip">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <span class="define-modal-close" data-dismiss="modal" aria-label="Close"><img src="/statics/images/sever_close.png" alt=""></span>
                <div class="modal-title">信息</div>
            </div>
            <div class="modal-body">
                <div>请填写完成必填信息！</div>
                <div data-dismiss="modal" aria-label="Close">确定</div>
            </div>
        </div>
    </div>
</div>
<!--信息填写提示  结束-->

<!--添加人员  form表单  开始-->
<form action="" id="add_user_form" method="post" style="display: none;">
    <input type="text" name="modal_select_status" value=""><!--选择类型-->
    <input type="text" name="modal_img_url" value=""><!--头像-->
    <input type="text" name="modal_input_name" value=""><!--姓名-->
    <input type="text" name="modal_input_phone" value=""><!--手机号-->
    <input type="text" name="modal_select_admin" value=""><!--科室-->
    <input type="text" name="modal_select_age" value=""><!--年龄-->
    <input type="text" name="modal_select_job" value=""><!--职称-->
    <input type="text" name="modal_select_supervisor" value=""><!--上级主管-->
    <input type="text" name="modal_select_password" value=""><!--密码设置-->
    <input type="text" name="modal_select_goodat" value=""><!--擅长-->
    <input type="text" name="modal_select_intro" value=""><!--简介-->
</form>
<!--添加人员  form表单  结束-->


<script>
    $(document).ready(function () {
        //页面窗口长度变化检测
        window_resize();
        function window_resize() {
            $(window).resize(function () {
                amend_modal_place($('#add_user_select_modal'));//修正弹窗位置  始终处于屏幕中央  选择
                amend_modal_place($('#add_user_doctor_modal'));//修正弹窗位置  始终处于屏幕中央  科室
                amend_modal_place($('#add_user_logistics_modal'));//修正弹窗位置  始终处于屏幕中央  后勤

                doctor_modal_select_admin_speace($('#doctor_select_admin'),$('#doctor_select_admin_btn'));//弹层  医生  选择科室下拉选择框  设置长度  及 位置
            });
        }

        //设置当前页面选中样式
        setting_style_the_page();
        function setting_style_the_page() {
            var first_menu_item = $('#sidebar-nav').find('a[href="#accounts-menu-first-01"]');//获取一级菜单可点击的a标签
            var img_nav = first_menu_item.find('.define-nav');//获取导航图片
            var img_left = first_menu_item.find('.define-left');//获取转向图片
            var first_ul = $('#accounts-menu-first-01');//获取一级下拉菜单
            var first_ul_li_one = first_ul.children('li').eq(1);//获取  "人员管理"

            first_menu_item.addClass('define-active');//一级菜单添加左边横线
            img_nav.attr('src','/statics/images/sever_hospital_select.png');//切换导航图片
            img_left.addClass('define-rotate-active');//添加动画类
            first_ul.addClass('in');//展拉一级菜单
            first_ul_li_one.addClass('define-active');//li添加左边横线
        }

        //分页切换效果
	    page_style_switch();
	    function page_style_switch() {
		    var page_ = $('.define-paging');
		    var the_first_page = $('#the_first_page');//获取首页
		    var prev_page = $('#prev_page');//获取上一页
		    var next_page = $('#next_page');//获取下一页
		    var the_last_page = $('#the_last_page');//获取尾页

		    // 123456
		    page_.delegate('.define-page','click',function () {
			    page_.find('.define-page').removeClass('define-active');
			    $(this).addClass('define-active');
		    });

		    // 上一页
		    prev_page.on('click',function () {
			    var active_page = page_.find('.define-active');
			    if(active_page.text() > 1){
				    page_.find('.define-page').removeClass('define-active');
				    active_page.prev().addClass('define-active')
			    }
		    });

		    // 下一页
		    next_page.on('click',function () {
			    var active_page = page_.find('.define-active');
			    if(active_page.text() < 5){
				    page_.find('.define-page').removeClass('define-active');
				    active_page.next().addClass('define-active')
			    }
		    });

		    // 首页
		    the_first_page.on('click',function () {
			    page_.find('.define-page').removeClass('define-active');
			    page_.find('.define-page').eq(0).addClass('define-active');
		    });

		    // 尾页
		    the_last_page.on('click',function () {
			    page_.find('.define-page').removeClass('define-active');
			    page_.find('.define-page').eq(4).addClass('define-active');
		    });

	    }

        //修正弹窗位置  始终处于屏幕中央
        function amend_modal_place($modal) {
            var window_width = $(window).width();
            var window_height = $(window).height();
            var width = $modal.width();
            var height = $modal.height();

            var left = ( window_width - width ) / 2;
            var top  = ( window_height - height ) / 2;

            $modal.css('left',left);
            $modal.css('top',top);
        }

        //modal  人员管理 添加按钮
        add_user_btn_select();
        function add_user_btn_select() {
            $('#admin_add_people').on('click',function () {
                amend_modal_place($('#add_user_select_modal'));//修正弹窗位置  始终处于屏幕中央
                modal_select_use_type_img();//modal 选择添加人员类型  img赋值为空
                $('#add_user_select_modal').modal({keyboard:false});
            });
        }

        //modal  选择添加人员类型
        modal_select_user_type();
        function modal_select_user_type() {
            $('#add_user_select_modal').delegate('tr','click',function () {
                modal_select_use_type_img();//modal 选择添加人员类型  img赋值为空
                $(this).find('img').attr('src','/statics/images/sever_select.png');//当前项添加选中状态
                modal_select_user_type_show_modal($(this).find('td').eq(0).text());//modal  选择添加人员类型  展示不同弹层
            })
        }

        //modal 选择添加人员类型  img赋值为空
        modal_select_use_type_img();
        function modal_select_use_type_img() {
            $('#add_user_select_modal').find('table').find('img').attr('src','');
            $('#add_user_select_modal').modal('hide');
        }

        //modal  选择添加人员类型  展示不同弹层
        function modal_select_user_type_show_modal($text) {
            if($text == '领导'){
                amend_modal_place($('#add_user_lead_modal'));//修正弹窗位置  始终处于屏幕中央
                $('#add_user_lead_modal').modal({keyboard:false});//打开弹层
            }

            if($text == '科室'){
                amend_modal_place($('#add_user_doctor_modal'));//修正弹窗位置  始终处于屏幕中央
                $('#add_user_doctor_modal').modal({keyboard:false});//打开弹层
            }

            if($text == '后勤'){
                amend_modal_place($('#add_user_logistics_modal'));//修正弹窗位置  始终处于屏幕中央
                $('#add_user_logistics_modal').modal({keyboard:false})
            }
        }

        //弹层  选择框长度赋值
        function select_length_give_value($select,$content,$number) {
            $select.width( $content.outerWidth() - $number );
        }

        //弹层  点击按钮  消除圆角
        function select_btn_hide_borders($btn) {
            $btn.css('borderBottomLeftRadius','0');
            $btn.css('borderBottomRightRadius','0');
        }

        //弹层  点击按钮  添加圆角
        function select_btn_show_borders($btn) {
            $btn.css('borderBottomLeftRadius','3px');
            $btn.css('borderBottomRightRadius','3px');
        }

        //弹层  点击按钮  修改导航图片url
        function select_btn_switch_img_url($btn,$select) {
            if( $select.hasClass('active') ){
                $btn.next().attr('src','/statics/images/sever_retrieve.png');
            }else {
                $btn.next().attr('src','/statics/images/sever_unretrieve.png');
            }
        }

        //弹层  添加图片  本地预览
        function local_input_click($input) {
            return $input.click();
        }

        //弹层  选定需要上传的文件之后  展示在窗口  预览即将上传的图片
        function previewImg($input,$img) {
            $input.change(function () {
                var objUrl = getObjectURL(this.files[0]) ;//获取文件url
                //如果不是img文件 ，提示不能选择此类文件
                if (this.files[0].type !== 'image/jpeg' && this.files[0].type !== 'image/png' && this.files[0].type !== 'image/gif') {
                    alert('不是有效的图片文件!');
                    $img.attr('src', '/statics/images/addpic.png');//赋值控制给img
                    return;
                }
                //获取到url 赋值img的url  并展示
                if (objUrl) {
                    $img.attr('src', objUrl);//赋值控制给img
                    lead_modal_sure_add_form_head_img($(this));//领导头像处理
                    doctor_modal_sure_add_form_head_img($(this));//科室头像处理
                    logistics_modal_sure_add_form_head_img($(this));//后勤头像处理
                }
            });
        }

        //弹层  获取文件的url
        function getObjectURL(file) {
            var url = null ;
            if (window.createObjectURL != undefined) {
                url = window.createObjectURL(file) ;// basic
            }
            else if (window.URL != undefined) {
                url = window.URL.createObjectURL(file) ;// mozilla(firefox)
            }
            else if (window.webkitURL != undefined) {
                url = window.webkitURL.createObjectURL(file) ;// webkit or chrome
            }
            return url ;
        }

        //领导
        //弹层  领导  选择类型下拉选择框  隐藏与显示及动画效果
        lead_modal_select_type();
        function lead_modal_select_type() {
            var btn = $('#lead_select_type_btn');//获取点击按钮
            btn.on('click',function () {
                var doctor_select_type = $('#lead_select_type');//获取下拉选择框

                select_length_give_value( doctor_select_type , btn , 2 ); //弹层  选择框长度赋值

                if( doctor_select_type.hasClass('active') ){
                    doctor_select_type.removeClass('active');//隐藏下拉选择框
                    doctor_select_type.animate({
                        height: 'toggle'
                    },500,function () {
                        select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                    });
                }else {
                    doctor_select_type.animate({
                        height: 'toggle'
                    },500);
                    select_btn_hide_borders(btn);//弹层  点击按钮  消除圆角
                    doctor_select_type.addClass('active');//显示下拉选择框
                }

                select_btn_switch_img_url( btn , doctor_select_type );//弹层  点击按钮  修改导航图片url
            });
        }

        //弹层  领导  选择类型下拉选择框  选择功能
        lead_modal_select_type_handle();
        function lead_modal_select_type_handle() {
            var btn = $('#lead_select_type_btn');//获取点击按钮
            var select = $('#lead_select_type');//获取下拉选择框
            select.delegate('div','click',function () {
                select.animate({
                    height: 'toggle'
                },500,function () {
                    select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                });
                select.find('div').removeClass('active');
                $(this).addClass('active');
                btn.text( $(this).text() );
                select.removeClass('active');//隐藏下拉选择框
                select_btn_switch_img_url(btn,select);//弹层  点击按钮  修改导航图片url
            })
        }

        //弹层  领导  选择图片功能
        lead_modal_select_img_function();
        function lead_modal_select_img_function() {
            $('#lead_modal_select_img').on('click',function () {
                var input = $('#lead_modal_select_img_input');
                local_input_click(input);//返回点击input  file
                previewImg(input,$('#lead_modal_select_img_show'));//选定需要上传的文件之后  展示在窗口  预览即将上传的图片
            });
        }

        //弹层  领导  重置功能
        lead_modal_reset_function();
        function lead_modal_reset_function() {
            $('#lead_resever').on('click',function () {
                var add_user_lead_modal = $('#add_user_lead_modal');
                var input = add_user_lead_modal.find('input');
                var textarea = add_user_lead_modal.find('textarea');
                input.eq(1).val('');
                input.eq(2).val('');
                input.eq(3).val('');
                input.eq(4).val('');
                textarea.val('');
            });
        }

        //弹层  领导  确认添加
        lead_modal_sure_add_function();
        function lead_modal_sure_add_function() {
            $('#lead_sure_add').on('click',function () {
                lead_modal_verify_must_write();//弹层  领导  必填选项填写提示  及表单提交
            });
        }

        //弹层  领导  必填选项填写提示  及表单提交
        function lead_modal_verify_must_write(){
            var add_user_lead_modal = $('#add_user_lead_modal');
            var input = add_user_lead_modal.find('input');
            if( input.eq(1).val() == '' || input.eq(3).val() == '' || input.eq(4).val() == '' ){
                amend_modal_place( $('#department_modal_tip'));//修正弹窗位置
                $('#department_modal_tip').modal({keyboard:false});//弹出弹层
                $('body').children('.modal-backdrop:last-child').css('zIndex','1050');//修改弹层层级
            }else {
                lead_modal_sure_add_form();//弹层  领导  form表单赋值
            }
        }

        //弹层  领导  form表单赋值  头像处理
        function lead_modal_sure_add_form_head_img(file_input) {
            var form = $('#add_user_form');//获取form表单
            var formData = new FormData();
            formData.append('file',file_input[0].files[0]);

            form.find('input[name="modal_img_url"]').val( formData );/*头像*/
        }

        //弹层  领导  form表单赋值
        function lead_modal_sure_add_form() {
            var add_user_lead_modal = $('#add_user_lead_modal');//领导弹层
            var input = add_user_lead_modal.find('input');//input
            var textarea = add_user_lead_modal.find('textarea');//简介
            var lead_select_type_btn = $('#lead_select_type_btn');//类型
            var form = $('#add_user_form');//获取form表单

            var status = 0;
            if( lead_select_type_btn == '院长' ){
                status = 1;
            }
            if( lead_select_type_btn == '副院长' ){
                status = 2;
            }
            if( lead_select_type_btn == '办公室主任' ){
                status = 3;
            }

            form.find('input[name="modal_select_status"]').val( status );/*选择类型*/
            //form.find('input[name="modal_img_url"]').val();/*头像*/
            form.find('input[name="modal_input_name"]').val( input.eq(1).val() );/*姓名*/
            form.find(' input[name="modal_input_phone"]').val( input.eq(4).val() );/*手机号*/
            //form.find('input[name="modal_select_admin"]').val();/*科室*/
            form.find('input[name="modal_select_age"]').val( input.eq(2).val() );/*年龄*/
            //form.find('input[name="modal_select_job"]').val();/*职称*/
            //form.find('input[name="modal_select_supervisor"]').val();/*上级主管*/
            form.find('input[name="modal_select_password"]').val( input.eq(3).val() );/*密码设置*/
            //form.find('input[name="modal_select_goodat"]').val();/*擅长*/
            form.find('input[name="modal_select_intro"]').val( textarea.val() );/*简介*/

            lead_modal_sure_add_form_ajax( form.serialize() );//弹层  领导  ajax提交表单数据
        }

        //弹层  领导  ajax提交表单数据
        function lead_modal_sure_add_form_ajax(data) {
            $.ajax({
                url: '',
                type: 'POST',
                dataType: 'json',
                data: data,
                success:function(data){
                    console.log(data);
                },
                error: function (err) {
                    console.log(err);
                }
            })
        }

        //科室
        //弹层  科室  选择类型下拉选择框  隐藏与显示及动画效果
        doctor_modal_select_type();
        function doctor_modal_select_type() {
            var btn = $('#doctor_select_type_btn');//获取点击按钮
            btn.on('click',function () {
                var doctor_select_type = $('#doctor_select_type');//获取下拉选择框

                select_length_give_value( doctor_select_type , btn , 2 ); //弹层  选择框长度赋值

                if( doctor_select_type.hasClass('active') ){
                    doctor_select_type.removeClass('active');//隐藏下拉选择框
                    doctor_select_type.animate({
                        height: 'toggle'
                    },500,function () {
                        select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                    });
                }else {
                    doctor_select_type.animate({
                        height: 'toggle'
                    },500);
                    select_btn_hide_borders(btn);//弹层  点击按钮  消除圆角
                    doctor_select_type.addClass('active');//显示下拉选择框
                }

                select_btn_switch_img_url( btn , doctor_select_type );//弹层  点击按钮  修改导航图片url
            });
        }

        //弹层  科室  选择类型下拉选择框  选择功能
        doctor_modal_select_type_handle();
        function doctor_modal_select_type_handle() {
            var btn = $('#doctor_select_type_btn');//获取点击按钮
            var doctor_select_type = $('#doctor_select_type');//获取下拉选择框
            doctor_select_type.delegate('div','click',function () {
                doctor_select_type.animate({
                    height: 'toggle'
                },500,function () {
                    select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                });
                doctor_select_type.find('div').removeClass('active');
                $(this).addClass('active');
                btn.text( $(this).text() );
                doctor_select_type.removeClass('active');//隐藏下拉选择框
                select_btn_switch_img_url(btn,doctor_select_type);//弹层  点击按钮  修改导航图片url
            })
        }

        //弹层  科室  选择图片功能
        doctor_modal_select_img_function();
        function doctor_modal_select_img_function() {
            $('#doctor_modal_select_img').on('click',function () {
                var input = $('#doctor_modal_select_img_input');
                local_input_click(input);//返回点击input  file
                previewImg(input,$('#doctor_modal_select_img_show'));//选定需要上传的文件之后  展示在窗口  预览即将上传的图片
            });
        }

        //弹层  科室  选择科室下拉选择框  显示与隐藏
        doctor_modal_select_admin_show_hide();
        function doctor_modal_select_admin_show_hide() {
            var btn = $('#doctor_select_admin_btn');//获取点击框
            var select = $('#doctor_select_admin');//获取下拉框
            btn.on('click',function () {
                doctor_modal_select_admin_speace(select,btn);//弹层  科室  选择科室下拉选择框  设置长度
                if( select.hasClass('active') ){
                    select.animate({
                        height: 'toggle'
                    },500,function () {
                        select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                    });
                    select.removeClass('active');//隐藏下拉选择框
                    btn.next().attr('src','/statics/images/sever_unretrieve.png');//修改导航图片
                }else {
                    select.animate({
                        height: 'toggle'
                    },500);
                    select_btn_hide_borders(btn);//弹层  点击按钮  消除圆角
                    select.addClass('active');//显示下拉选择框
                    btn.next().attr('src','/statics/images/sever_retrieve.png');//修改导航图片
                }
            });
        }

        //弹层  科室  选择科室下拉选择框  设置长度  及 位置
        function doctor_modal_select_admin_speace($select,$btn) {
            var window_width = $(window).width();
            if(window_width >= 1024){
                select_length_give_value($select,$btn,2);//弹层  选择框长度赋值
            }
            if(window_width >= 1920){
                select_length_give_value($select,$btn,2.5);//弹层  选择框长度赋值
            }
            $select.css('top',$btn.outerHeight() + 1);//设置弹层距离顶部位置
        }

        //弹层  科室  选择科室下拉选择框  选择功能
        doctor_modal_select_admin_function();
        function doctor_modal_select_admin_function() {
            var btn = $('#doctor_select_admin_btn');//获取点击框
            var select = $('#doctor_select_admin');//获取下拉框

            select.delegate('div','click',function () {
                select.find('div').removeClass('active');
                $(this).addClass('active');
                btn.val( $(this).text() );
                select.animate({
                    height: 'toggle'
                },500,function () {
                    select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                });
                btn.next().attr('src','/statics/images/sever_unretrieve.png');//修改导航图片
            });
        }

        //弹层  科室  重置功能
        doctor_modal_reset_function();
        function doctor_modal_reset_function() {
            $('#doctor_resever').on('click',function () {
                var add_user_doctor_modal = $('#add_user_doctor_modal');
                var input = add_user_doctor_modal.find('input');
                var textarea = add_user_doctor_modal.find('textarea');
                input.eq(1).val('');
                input.eq(3).val('');
                input.eq(4).val('');
                input.eq(5).val('');
                input.eq(6).val('');
                input.eq(7).val('');
                textarea.val('');
            });
        }

        //弹层  科室  确认添加
        doctor_modal_sure_add_function();
        function doctor_modal_sure_add_function() {
            $('#doctor_sure_add').on('click',function () {
                doctor_modal_verify_must_write();//弹层  科室  必填选项填写提示  及表单提交
            });
        }

        //弹层  科室  必填选项填写提示  及表单提交
        function doctor_modal_verify_must_write(){
            var add_user_doctor_modal = $('#add_user_doctor_modal');
            var input = add_user_doctor_modal.find('input');
            if( input.eq(1).val() == '' || input.eq(2).val() == '' || input.eq(3).val() == '' || input.eq(5).val() == '' ){
                amend_modal_place( $('#department_modal_tip'));//修正弹窗位置
                $('#department_modal_tip').modal({keyboard:false});//弹出弹层
                $('body').children('.modal-backdrop:last-child').css('zIndex','1050');//修改弹层层级
            }else {
                doctor_modal_sure_add_form();//弹层  领导  form表单赋值
            }
        }

        //弹层  科室  form表单赋值  头像处理
        function doctor_modal_sure_add_form_head_img(file_input) {
            var form = $('#add_user_form');//获取form表单
            var formData = new FormData();
            formData.append('file',file_input[0].files[0]);

            form.find('input[name="modal_img_url"]').val( formData );/*头像*/
        }

        //弹层  科室  form表单赋值
        function doctor_modal_sure_add_form() {
            var add_user_doctor_modal = $('#add_user_doctor_modal');//科室弹层
            var input = add_user_doctor_modal.find('input');//input
            var textarea = add_user_doctor_modal.find('textarea');//简介
            var doctor_select_type_btn = $('#doctor_select_type_btn');//类型
            var form = $('#add_user_form');//获取form表单

            var status = 0;
            if( doctor_select_type_btn.text() == '科室主任' ){
                status = 4;
            }
            if( doctor_select_type_btn.text() == '医生' ){
                status = 5;
            }
            if( doctor_select_type_btn.text() == '护士' ){
                status = 6;
            }

            form.find('input[name="modal_select_status"]').val( status );/*选择类型*/
            //form.find('input[name="modal_img_url"]').val();/*头像*/
            form.find('input[name="modal_input_name"]').val( input.eq(1).val() );/*姓名*/
            form.find(' input[name="modal_input_phone"]').val( input.eq(5).val() );/*手机号*/
            form.find('input[name="modal_select_admin"]').val( input.eq(2).val() );/*科室*/
            form.find('input[name="modal_select_age"]').val( input.eq(6).val() );/*年龄*/
            form.find('input[name="modal_select_job"]').val( input.eq(3).val() );/*职称*/
            //form.find('input[name="modal_select_supervisor"]').val();/*上级主管*/
            form.find('input[name="modal_select_password"]').val( input.eq(7).val() );/*密码设置*/
            form.find('input[name="modal_select_goodat"]').val( input.eq(4).val() );/*擅长*/
            form.find('input[name="modal_select_intro"]').val( textarea.val() );/*简介*/

            doctor_modal_sure_add_form_ajax( form.serialize() );//弹层  科室  ajax提交表单数据
        }

        //弹层  科室  ajax提交表单数据
        function doctor_modal_sure_add_form_ajax(data) {
            $.ajax({
                url: '',
                type: 'POST',
                dataType: 'json',
                data: data,
                success:function(data){
                    console.log(data);
                },
                error: function (err) {
                    console.log(err);
                }
            })
        }

        //后勤
        //弹层  后勤  选择类型下拉选择框  隐藏与显示及动画效果
        logistics_modal_select_type();
        function logistics_modal_select_type() {
            var btn = $('#logistics_select_type_btn');//获取点击按钮
            btn.on('click',function () {
                var doctor_select_type = $('#logistics_select_type');//获取下拉选择框

                select_length_give_value( doctor_select_type , btn , 2 ); //弹层  选择框长度赋值

                if( doctor_select_type.hasClass('active') ){
                    doctor_select_type.removeClass('active');//隐藏下拉选择框
                    doctor_select_type.animate({
                        height: 'toggle'
                    },500,function () {
                        select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                    });
                }else {
                    doctor_select_type.animate({
                        height: 'toggle'
                    },500);
                    select_btn_hide_borders(btn);//弹层  点击按钮  消除圆角
                    doctor_select_type.addClass('active');//显示下拉选择框
                }

                select_btn_switch_img_url( btn , doctor_select_type );//弹层  点击按钮  修改导航图片url
            });
        }

        //弹层  后勤  选择类型下拉选择框  选择功能
        logistics_modal_select_type_handle();
        function logistics_modal_select_type_handle() {
            var btn = $('#logistics_select_type_btn');//获取点击按钮
            var select = $('#logistics_select_type');//获取下拉选择框
            select.delegate('div','click',function () {
                select.animate({
                    height: 'toggle'
                },500,function () {
                    select_btn_show_borders(btn);//弹层  点击按钮  添加圆角
                });
                select.find('div').removeClass('active');
                $(this).addClass('active');
                btn.text( $(this).text() );
                select.removeClass('active');//隐藏下拉选择框
                select_btn_switch_img_url(btn,select);//弹层  点击按钮  修改导航图片url
            })
        }

        //弹层  后勤  选择图片功能
        logistics_modal_select_img_function();

        function logistics_modal_select_img_function() {
            $('#logistics_modal_select_img').on('click',function () {
                var input = $('#logistics_modal_select_img_input');
                local_input_click(input);//返回点击input  file
                previewImg(input,$('#logistics_modal_select_img_show'));//选定需要上传的文件之后  展示在窗口  预览即将上传的图片
            });
        }

        //弹层  后勤  重置功能
        logistics_modal_reset_function();
        function logistics_modal_reset_function() {
            $('#logistics_resever').on('click',function () {
                var add_user_logistics_modal = $('#add_user_logistics_modal');
                var input = add_user_logistics_modal.find('input');
                input.eq(1).val('');
                input.eq(2).val('');
                input.eq(3).val('');
                input.eq(4).val('');
            });
        }

        //弹层  后勤  确认添加  及表单提交
        logistics_modal_sure_add_function();
        function logistics_modal_sure_add_function() {
            $('#logistics_sure_add').on('click',function () {
                var add_user_logistics_modal = $('#add_user_logistics_modal');
                var input = add_user_logistics_modal.find('input');
                if( input.eq(1).val() == '' || input.eq(3).val() == '' || input.eq(4).val() == '' ){
                    amend_modal_place( $('#department_modal_tip'));//修正弹窗位置
                    $('#department_modal_tip').modal({keyboard:false});//弹出弹层
                    $('body').children('.modal-backdrop:last-child').css('zIndex','1050');//修改弹层层级
                }else {
                    logistics_modal_sure_add_form();//弹层  领导  form表单赋值
                }
            });
        }

        //弹层  后勤  form表单赋值  头像处理
        function logistics_modal_sure_add_form_head_img(file_input) {
            var form = $('#add_user_form');//获取form表单
            var formData = new FormData();
            formData.append('file',file_input[0].files[0]);

            form.find('input[name="modal_img_url"]').val( formData );/*头像*/
        }

        //弹层  后勤  form表单赋值
        function logistics_modal_sure_add_form() {
            var add_user_logistics_modal = $('#add_user_logistics_modal');//后勤弹层
            var input = add_user_logistics_modal.find('input');//input
            //var textarea = add_user_logistics_modal.find('textarea');//简介
            var logistics_select_type_btn = $('#logistics_select_type_btn');//类型
            var form = $('#add_user_form');//获取form表单

            var status = 0;
            if( logistics_select_type_btn.text() == '保安' ){
                status = 7;
            }
            if( logistics_select_type_btn.text() == '保洁' ){
                status = 8;
            }

            form.find('input[name="modal_select_status"]').val( status );/*选择类型*/
            form.find('input[name="modal_input_name"]').val( input.eq(1).val() );/*姓名*/
            form.find(' input[name="modal_input_phone"]').val( input.eq(3).val() );/*手机号*/
            //form.find('input[name="modal_select_admin"]').val( input.eq(2).val() );/*科室*/
            form.find('input[name="modal_select_age"]').val( input.eq(2).val() );/*年龄*/
            //form.find('input[name="modal_select_job"]').val( input.eq(3).val() );/*职称*/
            //form.find('input[name="modal_select_supervisor"]').val();/*上级主管*/
            form.find('input[name="modal_select_password"]').val( input.eq(4).val() );/*密码设置*/
            //form.find('input[name="modal_select_goodat"]').val( input.eq(4).val() );/*擅长*/
            //form.find('input[name="modal_select_intro"]').val( textarea.val() );/*简介*/

            logistics_modal_sure_add_form_ajax( form.serialize() );//弹层  后勤  ajax提交表单数据
        }

        //弹层  后勤  ajax提交表单数据
        function logistics_modal_sure_add_form_ajax(data) {
            $.ajax({
                url: '',
                type: 'POST',
                dataType: 'json',
                data: data,
                success:function(data){
                    console.log(data);
                },
                error: function (err) {
                    console.log(err);
                }
            })
        }
        
        /************************************  搜索功能  ************************************/
        //select及页面赋值
        give_value_button_select();
        function give_value_button_select() {
            var dropdown_menu_ul = $('#dropdown_menu_ul');//获取下拉菜单
            var dropdown_menu_select = $('#dropdown_menu_select');//select
            var dLabel = $('#dLabel');//button
            var local_url = location.href;//获取地址

            if( local_url.split('?')[1] == undefined || local_url.split('?')[1] == '' ){
                console.log('aaa');
            }else {
                var val = document.cookie.split(';')[0].split('&')[0].split('=')[1];
                var text = document.cookie.split(';')[0].split('&')[1].split('=')[1];
                dLabel.html( text + ' <i class="icon-chevron-down"></i>' );
                dropdown_menu_select.find('option').attr( 'value' , val );
                dropdown_menu_select.find('option').text( text );
            }
        }

        //选择科室
        search_select_admin();
        function search_select_admin() {
            var dropdown_menu_ul = $('#dropdown_menu_ul');//获取下拉菜单
            var dropdown_menu_select = $('#dropdown_menu_select');//select
            var dLabel = $('#dLabel');//button

            dropdown_menu_ul.delegate('li','click',function () {
                dLabel.html( $(this).text() + ' <i class="icon-chevron-down"></i>' );
                dropdown_menu_select.find('option').attr( 'value' , $(this).attr('data_value') );
                dropdown_menu_select.find('option').text( $(this).text() );
                document.cookie = 'd_val=' + $(this).attr('data_value') + '&d_text=' + $(this).text();
            })
        }
        
        /*启用、禁用功能*/
        used_and_unused_function();
        function used_and_unused_function() {
            var table = $('#table_handle');
            table.delegate('.define_used','click',function () {
                var img_src = $(this).find('img').attr('src');
                if($(this).text() == '启用'){
                    $(this).html('<img src="/statics/images/sever_disabled.png" alt="">' + '禁用');
                }else {
                    $(this).html('<img src="/statics/images/sever_undisabled.png" alt="">' + '启用');
                }
            });
        }

    });
</script>
 <script>loadCent('80%',100);</script>
 <?php if($isLogin && !I('get.ifm')){?>

            </div>
        </div>
    </div>
	<script type="text/html" id="notice">
		<div class="alert alert-info" style="display:none;margin:1px 0 5px 0;">
     	   	<button type="button" class="close" data-dismiss="alert">×</button>
     	   	<strong>温馨提示:</strong> <span class="maintips"></span>
   	 	</div>
	</script>
	<script src="/statics/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            if($.cookie('_sysdomain')){
            	var cookiePars = $.cookie('_sysdomain');
            	parmComb = cookiePars.split('@');
            	$('.row-fluid:first').prepend($('#notice').html());
            	$('.alert .maintips').html(parmComb[0]);
            	$('.alert').show(10,function(){
            			$.cookie('_sysdomain',null,{'path':'/'});
	            		setTimeout(function(){
	            			$('.alert').slideUp(600,function(){
	            				$('.alert').remove();
	            			});
	            			var list = window.parent.art.dialog.list;
	            			if(parmComb[1] != '0')
	            				window.parent.location = parmComb[1];
	            			else
	            				window.parent.location.reload();
	            			list['TIPCHOSEID'].close();
	            		},2000);
            		});
            }
        });
        $(function(){
        	$('.ifrm').live('click',function(){
        		opens($(this).data('url'),$(this).data('width'),$(this).data('height'),$(this).data('title'),$(this).data('params'));
        		return false;
        	});
        	$('.ifrm').each(function(){
           		$(this).attr('title',$(this).data('title'));
           	});
        	<?php if(!isset($_SESSION['tj_life']) || (time()-$_SESSION['tj_life'] > 3600)){?>
		   		//$.get('/index/getCountCj',{},function(){});
		   	<?php }?>
        })
    </script>
  </body>
</html>
<?php }else{?>
            </div>
        </div>
    </div>
	<script src="/statics/lib/bootstrap/js/bootstrap.js"></script>
	<script type="text/html" id="notice">
		<div class="alert alert-info" style="display:none;margin:1px 0 5px 0;">
     	   	<button type="button" class="close" data-dismiss="alert">×</button>
     	   	<strong>温馨提示:</strong> <span class="maintips"></span>
   	 	</div>
	</script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            if($.cookie('_sysdomain')){
            	var cookiePars = $.cookie('_sysdomain');
            	parmComb = cookiePars.split('@');
            	$('.row-fluid:first').prepend($('#notice').html());
            	$('.alert .maintips').html(parmComb[0]);
            	$('.alert').show(10,function(){
            			$.cookie('_sysdomain',null,{'path':'/'});
            			$.cookie('_sysdomain',null);
                		setTimeout(function(){
                			$('.alert').slideUp(600,function(){
                				$('.alert').remove();
    	            			var list = window.parent.art.dialog.list;
    	            			if(parmComb[1] != '0')
    	            				window.parent.location = parmComb[1];
    	            			else
    	            				window.parent.location.reload();
    	            			list['TIPCHOSEID'].close();
                			});
                		},2000);
            		});
            }
           	$('.ifrm').click(function(){
        		opens($(this).data('url'),$(this).data('width'),$(this).data('height'),$(this).data('title'),$(this).data('params'));
        		return false;
        	});
           	$('.ifrm').each(function(){
           		$(this).attr('title',$(this).data('title'));
           	});
        	<?php if(!isset($_SESSION['tj_life']) || (time()-$_SESSION['tj_life'] > 3600)){?>
		   		//$.get('/index/getCountCj',{},function(){});
		   	<?php }?>
        })
    </script>
  </body>
</html>
<?php }?>
<script>loadCent('100%',100);setTimeout(function(){$('#loadIngCent').fadeOut('fast')},800);</script>